{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import tensorflow as tf\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "from tqdm import tqdm\n",
    "import random\n",
    "import time\n",
    "sns.set()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_vocab(file, lower = False):\n",
    "    with open(file, 'r') as fopen:\n",
    "        data = fopen.read()\n",
    "    if lower:\n",
    "        data = data.lower()\n",
    "    vocab = list(set(data))\n",
    "    return data, vocab\n",
    "\n",
    "def embed_to_onehot(data, vocab):\n",
    "    onehot = np.zeros((len(data), len(vocab)), dtype = np.float32)\n",
    "    for i in range(len(data)):\n",
    "        onehot[i, vocab.index(data[i])] = 1.0\n",
    "    return onehot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "text, text_vocab = get_vocab('shakespeare.txt', lower = False)\n",
    "onehot = embed_to_onehot(text, text_vocab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "learning_rate = 0.01\n",
    "batch_size = 128\n",
    "sequence_length = 64\n",
    "epoch = 3000\n",
    "num_layers = 2\n",
    "size_layer = 512\n",
    "possible_batch_id = range(len(text) - sequence_length - 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Model:\n",
    "    def __init__(\n",
    "        self, num_layers, size_layer, dimension, sequence_length, learning_rate\n",
    "    ):\n",
    "        def lstm_cell():\n",
    "            return tf.nn.rnn_cell.LSTMCell(\n",
    "                size_layer, sequence_length, state_is_tuple = False\n",
    "            )\n",
    "\n",
    "        self.rnn_cells = tf.nn.rnn_cell.MultiRNNCell(\n",
    "            [lstm_cell() for _ in range(num_layers)], state_is_tuple = False\n",
    "        )\n",
    "        self.X = tf.placeholder(tf.float32, (None, None, dimension))\n",
    "        self.Y = tf.placeholder(tf.float32, (None, None, dimension))\n",
    "        self.hidden_layer = tf.placeholder(\n",
    "            tf.float32, (None, num_layers * 2 * size_layer)\n",
    "        )\n",
    "        self.outputs, self.last_state = tf.nn.dynamic_rnn(\n",
    "            self.rnn_cells,\n",
    "            self.X,\n",
    "            initial_state = self.hidden_layer,\n",
    "            dtype = tf.float32,\n",
    "        )\n",
    "        rnn_W = tf.Variable(tf.random_normal((size_layer, dimension)))\n",
    "        rnn_B = tf.Variable(tf.random_normal([dimension]))\n",
    "        self.logits = (\n",
    "            tf.matmul(tf.reshape(self.outputs, [-1, size_layer]), rnn_W) + rnn_B\n",
    "        )\n",
    "        y_batch_long = tf.reshape(self.Y, [-1, dimension])\n",
    "        self.cost = tf.reduce_mean(\n",
    "            tf.nn.softmax_cross_entropy_with_logits(\n",
    "                logits = self.logits, labels = y_batch_long\n",
    "            )\n",
    "        )\n",
    "        self.optimizer = tf.train.RMSPropOptimizer(learning_rate, 0.9).minimize(\n",
    "            self.cost\n",
    "        )\n",
    "        self.correct_pred = tf.equal(\n",
    "            tf.argmax(self.logits, 1), tf.argmax(y_batch_long, 1)\n",
    "        )\n",
    "        self.accuracy = tf.reduce_mean(tf.cast(self.correct_pred, tf.float32))\n",
    "        seq_shape = tf.shape(self.outputs)\n",
    "        self.final_outputs = tf.reshape(\n",
    "            tf.nn.softmax(self.logits), (seq_shape[0], seq_shape[1], dimension)\n",
    "        )\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:<tensorflow.python.ops.rnn_cell_impl.LSTMCell object at 0x7f77a4760a58>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.\n",
      "WARNING:tensorflow:<tensorflow.python.ops.rnn_cell_impl.LSTMCell object at 0x7f77a4760a90>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.\n",
      "WARNING:tensorflow:From <ipython-input-5-ab798ebdc858>:32: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "\n",
      "Future major versions of TensorFlow will allow gradients to flow\n",
      "into the labels input on backprop by default.\n",
      "\n",
      "See `tf.nn.softmax_cross_entropy_with_logits_v2`.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "tf.reset_default_graph()\n",
    "sess = tf.InteractiveSession()\n",
    "model = Model(num_layers, size_layer, len(text_vocab), sequence_length, learning_rate)\n",
    "sess.run(tf.global_variables_initializer())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "that\n"
     ]
    }
   ],
   "source": [
    "split_text = text.split()\n",
    "tag = split_text[np.random.randint(0, len(split_text))]\n",
    "print(tag)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def train_random_sequence():\n",
    "    LOST, ACCURACY = [], []\n",
    "    pbar = tqdm(range(epoch), desc = 'epoch')\n",
    "    for i in pbar:\n",
    "        last_time = time.time()\n",
    "        init_value = np.zeros((batch_size, num_layers * 2 * size_layer))\n",
    "        batch_x = np.zeros((batch_size, sequence_length, len(text_vocab)))\n",
    "        batch_y = np.zeros((batch_size, sequence_length, len(text_vocab)))\n",
    "        batch_id = random.sample(possible_batch_id, batch_size)\n",
    "        for n in range(sequence_length):\n",
    "            id1 = [k + n for k in batch_id]\n",
    "            id2 = [k + n + 1 for k in batch_id]\n",
    "            batch_x[:,n,:] = onehot[id1, :]\n",
    "            batch_y[:,n,:] = onehot[id2, :]\n",
    "        last_state, _, loss = sess.run([model.last_state, model.optimizer, model.cost], \n",
    "                                       feed_dict = {model.X: batch_x, \n",
    "                                                    model.Y: batch_y,\n",
    "                                                    model.hidden_layer: init_value})\n",
    "        accuracy = sess.run(model.accuracy, feed_dict = {model.X: batch_x, \n",
    "                                                         model.Y: batch_y, \n",
    "                                                         model.hidden_layer: init_value})\n",
    "        ACCURACY.append(accuracy); LOST.append(loss)\n",
    "        init_value = last_state\n",
    "        pbar.set_postfix(cost = loss, accuracy = accuracy)\n",
    "    return LOST, ACCURACY"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "epoch: 100%|██████████| 3000/3000 [13:49<00:00,  3.61it/s, accuracy=0.887, cost=0.83] \n"
     ]
    }
   ],
   "source": [
    "LOST, ACCURACY = train_random_sequence()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA4EAAAFICAYAAADu0vuZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzs3XecXHW9//HXmdnes5vdlE1vX1IgIYQaWiIICiJYUCzghauiiJeiGBXbtWHFn4LSFUHxYkUBG1JDCwmhheSbQnrbzWazvc7M74+ZnWzPzOzsnCnv5+PBIzNnTvkc9MHJ+3ybEwgEEBERERERkczgcbsAERERERERSRyFQBERERERkQyiECgiIiIiIpJBFAJFREREREQyiEKgiIiIiIhIBlEIFBERERERySAKgSIiIiIiIhlEIVBERERERCSDKASKiIiIiIhkEIVAERERERGRDKIQKCIiIiIikkGy3C5ghHKB44G9gM/lWkREZPR4gQnAS0CHy7WkAj0fRUQyR9TPyFQPgccDz7hdhIiIJMxpwEq3i0gBej6KiGSeiJ+RqR4C9wLU17fg9wdiPklFRRF1dc1xKypZZcJ9ZsI9gu4znWTCPcLI79PjcRgzphBC/92XI4rL8xEy4/+jmXCPoPtMJ5lwj6D7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GrGKiIjMh3KkSHXoSqBIFZlZA/CPwKvAVcDvAp83s9+LN/kgsBdYCfwd8IKZ5cwsF+/3r8Bq4LPA98zM4v0eB24Fdsb7fhEolr31nYDF7/dInCxFREQSQzlSpHp0JVCkiszsNmCvu28qa/sycC1wBHivu98etzcQnc38aLzpXmC9uxfj/j2AA18B+oHbx8+Ilr32FqKznBvd/a247efA1939+1cqThERkflSjhSpHt0dVKS6NgPrzex8WVsW+ClRgjs23ujuRTN7C1gfNx0bT26xI0RnSlcBzcDBGd73VNnjAaC14ghERESuDOVIkSpREShSXceAQ+6+bXJH/HmHjWXPG4ANwIm4aaOZNZQluU3AG8BZYAi4hmgJjYiISD1SjhSpEhWBItX1c6DXzL4EPAGMANcB+bj/VjO7B3gR+BwwDPwMyBCdnfyimf0NcAewC9gRnw39LvB1M3sAOA38FvCr6oUlIiKyYMqRIlWiG8OIVJG7F4APEN297BDRGcpngLZ4kx8Cu4Ee4AHgHncfdfcRooT2vnifp4AH3f31eL+Hie529gugG/hrdHyLiEgdUY4UqR7dGEYkIeKlLlvd/f5aj0VERCRJlCNFFpfOgoiIiIiIiARERaCIiIiIiEhAtBxUREREREQkILoSKCIiIiIiEhAVgSIiIiIiIgFRESgiIiIiIhIQFYEiIiIiIiIBUREoIiIiIiISkP8Hi1bPBENfoAgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 1080x360 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize = (15, 5))\n",
    "plt.subplot(1, 2, 1)\n",
    "EPOCH = np.arange(len(LOST))\n",
    "plt.plot(EPOCH, LOST)\n",
    "plt.xlabel('epoch'); plt.ylabel('loss')\n",
    "plt.subplot(1, 2, 2)\n",
    "plt.plot(EPOCH, ACCURACY)\n",
    "plt.xlabel('epoch'); plt.ylabel('accuracy')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "def generate_based_sequence(length_sentence, argmax = False):\n",
    "    sentence_generated = tag\n",
    "    onehot = embed_to_onehot(tag, text_vocab)\n",
    "    init_value = np.zeros((1, num_layers * 2 * size_layer))\n",
    "    for i in range(len(tag)):\n",
    "        batch_x = np.zeros((1, 1, len(text_vocab)))\n",
    "        batch_x[:, 0, :] = onehot[i, :]\n",
    "        last_state, prob = sess.run(\n",
    "            [model.last_state, model.final_outputs],\n",
    "            feed_dict = {model.X: batch_x, model.hidden_layer: init_value},\n",
    "        )\n",
    "        init_value = last_state\n",
    "\n",
    "    for i in range(length_sentence):\n",
    "        if argmax:\n",
    "            char = np.argmax(prob[0][0])\n",
    "        else:\n",
    "            char = np.random.choice(range(len(text_vocab)), p = prob[0][0])\n",
    "        element = text_vocab[char]\n",
    "        sentence_generated += element\n",
    "        onehot = embed_to_onehot(element, text_vocab)\n",
    "        batch_x = np.zeros((1, 1, len(text_vocab)))\n",
    "        batch_x[:, 0, :] = onehot[0, :]\n",
    "        last_state, prob = sess.run(\n",
    "            [model.last_state, model.final_outputs],\n",
    "            feed_dict = {model.X: batch_x, model.hidden_layer: init_value},\n",
    "        )\n",
    "        init_value = last_state\n",
    "\n",
    "    return sentence_generated"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "that the world goes well, who rather\n",
      "had been so brief with him, and all of slanderous stoutness\n",
      "He shall not be so bold to be of morrow.\n",
      "\n",
      "KING EDWARD IV:\n",
      "What says his majesty?\n",
      "\n",
      "NORTHUMBERLAND:\n",
      "Here come the children of the blood of my sweet boy\n",
      "Thy brother wrought by the boldness of my heart,\n",
      "That thou hast made me by my brother's son,\n",
      "The son of England's face, my dear lord's death!\n",
      "Lo, ere I can repeat this cursed pale.\n",
      "\n",
      "QUEEN MARGARET:\n",
      "Why, then, the whate that I should be proclaim'd\n",
      "In exchange than the rest of the complexion of the king,\n",
      "And be in barded steps your promise proud to hear\n",
      "My brother wrought by the fire\n",
      "Of both of your highness complaining.\n",
      "\n",
      "Servant:\n",
      "My gracious lord, I think he cannot choose.\n",
      "\n",
      "Second Murderer:\n",
      "Who made thee fair. But if he thus\n",
      "death to use me for the best of it.\n",
      "\n",
      "KATHARINA:\n",
      "Why, sir, you must part your form.\n",
      "\n",
      "MIRANDA:\n",
      "But the removed friend,\n",
      "My tears shall share with shame to be my son,\n",
      "The sons of Edward will be sure of you.\n",
      "\n",
      "GLOUCESTER:\n",
      "I go. What \n"
     ]
    }
   ],
   "source": [
    "print(generate_based_sequence(1000,True))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "that a big and mercy enemies.\n",
      "My sons shall never brook pronounce in his\n",
      "counstles far their loss, a boon that slew thyself?\n",
      "\n",
      "First Citizen:\n",
      "And but to strike, madam, in his sple ncess,\n",
      "His grave like mine office in the prison, love me,\n",
      "My bed with your pleasure.\n",
      "\n",
      "AUFIDIUS:\n",
      "Call me too, yet your grace\n",
      "For fair without not: but, I'll oft beautiful\n",
      "Wife is gone, and well see--was't that is found dagger.\n",
      "Gardenerer, thou hadst been said: 'I thank myself\n",
      "Fool to his councell'd spirit in peace be made,\n",
      "Some of those weakness are his children\n",
      "dress'd his beauty had been silent. Please you to make thy hell,\n",
      "In breast that had their soldiers usurp.\n",
      "And brief, so heartily he be safet,\n",
      "With something dissension by the swording friend,\n",
      "Which butts my stay to his foel wanders to all noble father?\n",
      "Pay to thy sweet son: since the contents remember\n",
      ": yet I had fought to breathe,--play edity\n",
      "but little a army piece of earth.\n",
      "\n",
      "DUKE OF YORK:\n",
      "My counsel, let us shame his back in pray\n",
      "To stale more precious t\n"
     ]
    }
   ],
   "source": [
    "print(generate_based_sequence(1000,False))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
